<script>
  export default {
    onLaunch: function() {
      uni.getSystemInfo({
        success: function(res) {
          if (res.platform != "ios") {
            //#ifdef APP-PLUS
            uni.request({
              method: 'POST',
              url: 'https://exam.lysxrj.com/api/Version/Update',
              data: {
                "appid": plus.runtime.appid,
                "version": plus.runtime.version
              },
              success: (res) => {
                let updateUrl = res.data.data.Url;
                if (res.data.data.Status == true) {
                  uni.showModal({ //提醒用户更新  
                    title: "更新提示！点击确定开始下载新版！",
                    content: res.data.data.RelaseNote,
                    success: (res) => {
                      if (res.confirm) {
                        plus.runtime.openURL(updateUrl);
                      }
                    }
                  })
                }
              }
            })
            //#endif  
          }
        }
      });


    },
    onShow: function() {
      //console.log('App Show')
    },
    onHide: function() {
      //console.log('App Hide')
    }
  };
</script>

<style>
  /*每个页面公共css */
  @import './common/uni.css';

  .line {
    height: 15upx;
    background-color: #f2f2f2;
  }

  .wline {
    height: 50upx;
  }

  uni-checkbox .uni-checkbox-input {
    border-radius: 50px;
  }

  uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
    color: #27b28b !important;
  }

  wx-checkbox .uni-checkbox-input {
    border-radius: 50px;
  }

  wx-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
    color: #27b28b !important;
  }

  wx-page,
  wx-page-wrapper {
    background-color: #f2f2f2 !important;
  }

  uni-page,
  uni-page-wrapper {
    background-color: #f2f2f2 !important;
  }

  .segmented-control-item.text.active {
    border-bottom-width: 2px;
  }

  uni-tabbar .uni-tabbar__bd,
  uni-tabbar .uni-tabbar__item {
    padding: 5px 0 !important;
  }

  wx-tabbar .uni-tabbar__bd,
  wx-tabbar .uni-tabbar__item {
    padding: 5px 0 !important;
  }
</style>
